<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page
	import="com.AddressListModule.bean.*,com.AddressListModule.dao.*"%>
<%

	StringBuffer sb = (StringBuffer)session.getAttribute("sb");
	String selectPhone  = request.getParameter("selectPhone");
	String formName = request.getParameter("formName");
%>
<jsp:include page="../head.jsp"></jsp:include>
<script type="text/javascript">
                           $(document).ready(function(){
								$('.treeview').treeview();
								//$('.treeview li a').after('<span title="添加子节点" class="addnode"><a href="javascript:alert(1);">添加子节点</a></span><span title="编辑该节点" class="editnode"><a href="javascript:alert(2);">编辑该节点</a></span><span title="删除该节点" class="delnode"><a href="javascript:alert(3);">删除该节点</a></span>');
								$('.treeview li span').hide();
								$('.treeview li').hover(function(){
									$(this).children('span').show();
								},function(){
									$(this).children('span').hide();
								});
							});

		</script> 
		<script type="text/javascript">
			function doClose(va){
				 eval("top.frmMessage.mb.close();");
			}
			function selectZhiwu(va){
				document.getElementById("zhiwu").value=va;
			}
			function getV(va){
				var inp = document.getElementsByTagName("select");
				var str="";
				var lastStr="";
				if(inp.length>0){
					for(var i = 0;i<inp.length-1;i++){
						var oldValue=document.getElementById("box"+(i+1)).value
						var newValue=inp[i].value;
						if(va.id==(i+1)){
							str+=inp[i].id+"/"+newValue+",";
						}else{
							str+=inp[i].id+"/"+oldValue+",";
						}
						
					}
					lastStr=encodeURI(str);
					lastStr=encodeURI(lastStr);
					window.location="../AddressServlet?method=selectDir&formName=<%=formName%>&selectPhone=<%=selectPhone%>&lastStr="+lastStr;
				}
				
			}
		</script>
</head>
  <body>
  <div id="sstc">
			<ul class="tabs-nav clearfix">
				<li>通讯录管理</li>
			</ul>
			<div class="tabs-panel">
				<table class="datalist">
					<tr>
						<td>
							<ul class="treeview" id="headerIndex">
								<%=sb %>
							</ul>
						</td>
					</tr>
				</table>
			</div>
			<div align="center">	
                <input type="button" name="doSubmit" id="doSubmit" value="提交" onclick="do_Submit('<%=formName %>','<%=selectPhone %>');">
                <input type="hidden" name="zhiwu" id="zhiwu" value=""/>
			    <input type="button" name="close" id="close" value="取消" onclick="doClose('<%=formName %>');">
			</div>
		</div>
			
</body>
</html>
